import 'package:flutter/material.dart';
import 'package:flutter_juwo/common/common_index.dart';
import 'package:flutter_juwo/ui/custom/real_rich_text.dart';
import 'package:flutter_juwo/ui/utils/utils.dart';

class NoData extends StatelessWidget {
  Function _fun;
  NoData(this._fun);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colours.c243,
      body: Center(
        child: GestureDetector(
          onTap: () {
            _fun();
          },
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Container(
                child: Image.asset(
                  Utils.getImgPath("pic_no_order"),
                  width: ScreenUtil().setWidth(300),
                ),
              ),
              Container(
                margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(150)),
                child: RealRichText([
                  TextSpan(
                    text: "暂无内容，点击",
                    style: TextStyles.custom(
                        28, Colours.appC2, Font.PingFangMedium),
                  ),
                  TextSpan(
                    text: "刷新",
                    style: TextStyles.custom(
                        28, Colours.appC11, Font.PingFangMedium),
                  ),
                ]),
              )
            ],
          ),
        ),
      ),
    );
  }
}
